﻿@using JsonSong.Front.Extend
@using Suijing.Utils.sysTools

@{
    Layout = "_LteBaseLayout.cshtml";
    var indexModels = ControllerHelper.GetIndexModules();
}

@section head
{
    @RenderSection("head", false)
}
@section foot
{
    @RenderSection("foot", false)
}

<div class="wrapper" ms-controller="msTopContent" id="divTopContent">
    <!-- Main Header -->
    @Html.Partial("LTEPartial/_LteTopTip")

    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">

        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">

            <!-- Sidebar user panel (optional) -->
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="~/Content/imgs/photo.png" class="img-circle" alt="User Image">
                </div>
                <div class="pull-left info">
                    <p>Alexander Pierce</p>
                    <!-- Status -->
                    <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
                </div>
            </div>

            <!-- search form (Optional) -->
            <form action="#" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="q" class="form-control" placeholder="Search...">
                    <span class="input-group-btn">
                        <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i></button>
                    </span>
                </div>
            </form>
            <!-- /.search form -->
            <!-- Sidebar Menu -->
            <ul class="sidebar-menu">
                @foreach (var module in indexModels)
                {
                    if (!module.Children.HasValue())
                    {
            <li class="" data-url="@module.Url" data-vname="@module.VName">
                <a href="#">
                    <i class="fa fa-dashboard"></i> <span>@module.Name</span>
                </a>
            </li>
                    }
                    else
                    {
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-laptop"></i>
                    <span>@module.Name</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    @foreach (var cModule in module.Children)
                                {
                                <li data-url="@module.Url" data-vname="@module.VName">
                                    <a href="#!@cModule.Url" style="margin-left: 10px;"><i class="fa fa-angle-double-right"></i>@cModule.Name</a>
                                </li>
                                }
                </ul>
            </li>
                    }
                }

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-envelope"></i> <span>LteDemo</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    @Html.Partial("LTEPartial/_LteDemoIndex")
                </li>
                <li>
                    <a href="#!/home/LteDemo?path=examples/login.html">
                        <i class="fa fa-folder"></i> <span>test</span>

                    </a>

                </li>
            </ul><!-- /.sidebar-menu -->
        </section>
        <!-- /.sidebar -->
    </aside>

    @RenderBody()

    @*下面即是原始样式, 具体内容在子页中维护
        注意:content-wrapper包含两部分,一是标题和面包屑 ,二是具体内容页,目前是前者在home index 中维护 并进行异步填充内容的总控制
        具体的content 才在子页面中实现*@

    @*<!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper" style="min-height: 438px;">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>
                    Page Header
                    <small>Optional description</small>
                </h1>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
                    <li class="active">Here</li>
                </ol>
            </section>

            <!-- Main content -->
            <section class="content">

                <!-- Your Page Content Here -->

            </section><!-- /.content -->
        </div><!-- /.content-wrapper -->*@

    <!-- Main Footer -->
    <footer class="main-footer">
        <!-- To the right -->
        <div class="pull-right hidden-xs">
            <ul class="list-inline text-center">
                <li>友情链接：</li>
                <li><a href="http://www.bootcss.com/" target="_blank">BootStrap</a></li>
                <li><a href="http://www.almsaeedstudio.com/" target="_blank">AdminLTE</a></li>
                <li><a href="http://rubylouvre.github.io/mvvm/avalon.api.html" target="_blank">avalon</a></li>
            </ul>
        </div>
        <!-- Default to the left -->
        <strong>Copyright © 2015 <a href="#">Company</a>.</strong> All rights reserved.
    </footer>

</div>



